package converter;

import java.io.IOException;

public class convertTest {

	/**
	 * @param args
	 * @throws Exception 
	 */
	public static void main(String[] args) throws Exception {
		String cmd = "/opt/libreoffice4.2/program/soffice --invisible --convert-to pdf --outdir /home/zhaoxiang/java/flexPaper ";
		Runtime runtime = Runtime.getRuntime();
		Process process = runtime.exec(cmd+args[0]);
		if (process.waitFor() != 0) {
			System.out.println("命令执行失败! "+process.exitValue());// p.exitValue()==0表示正常结束，1：非正常结束
			return ;
		}
	}

}
